#include "process.h"

//模拟下载场景
double target_file_size=1024.0;//这么多兆文件
double speed = 1.0;//下载速度

void Download(double size,double split)
{
    double current_total = 0.0;
    while(current_total <=size)
    {
        FlushProcess(size,current_total);
        if(current_total >=size) break;
        usleep(10000);//代表一次下载
        current_total += split;
    }
}

int main()
{
    //Process();
    printf("下载中:\n");
    Download(target_file_size,speed);
    printf("\n");
    return 0;
}
